<?php

include ("../model/kernel/common.php");
include ("../model/classes/Ubb/Ubb.class.php");
include "ubb.php";

$u = new Ubb();

$testData = "[url]http://www.tessdfasdfasfasdfadsfsadfasdfasdfasdfttessdfasdfasfasdfadsfsadfasdfasdfasdfttessdfasdfasfasdfadsfsadfasdfasdfasdft.com[/url][url]http://www.tessdfasdfasfasdfadsfsadfasdfasdfasdfttessdfasdfasfasdfadsfsadfasdfasdfasdfttessdfasdfasfasdfadsfsadfasdfasdfasdft.com[/url]adfadsf[url=www.test.com]super link[/url][url=www.test.com]super link[/url]asdfadsf[url=http://www.sina.com.cn]wokao[/url][email]font99@gmail.com[/email]asdfasdf[email=font990@gmail.com][/email]dsfdsf[email=font990@gmail.com]砖石[/email][img]http://www.elle.cn/pm_elle/themes/original/img/logo_left.png[/img][img=http://www.baidu.com/img/baidu_logo.gif][/img][color=red]hello[/color][color=red]world[/color][size=9]test[/size][size=9px]test2[/size][size=1][font=宋体]我凸[/font][/size][size=24px][font=宋体,serif]我凸[/font][/size][swf=200,200:y]http://www.baidu.com/swf.swf[/swf]";


$startTime = sprintf('%.8f',array_sum(explode(' ', microtime())));

$i = 0;

while(1)
{
	ubb($testData);
	
	$i++;
	if ($i == 5000)
		break;
}

$endTime = sprintf('%0.6f',sprintf('%.8f',array_sum(explode(' ', microtime()))) - $startTime);
echo $endTime."<br />";
/////////////////////////////////////////////
$startTime = sprintf('%.8f',array_sum(explode(' ', microtime())));
$i = 0;

while(1)
{
	$u -> parseUbb($testData);
	$i++;
	if ($i == 5000)
		break;
}

$endTime = sprintf('%0.6f',sprintf('%.8f',array_sum(explode(' ', microtime()))) - $startTime);
echo $endTime."<br />";
?>
